%run the positionCP code for a set of images and get the result
[zero, one, two, three, four, five, six, seven, eight, nine] = readImages('../datasets/zip.train');

% numImgToProcess = 10;
cpNum           = 16;

results = zeros(16,16,10);

figure; colormap gray;
hold on;
for i = 0:9
    i
    
    % store image details
    if(i == 0)
        images = zero;
    elseif(i == 1)
        images = one;
    elseif(i == 2)
        images = two;
    elseif(i == 3)
        images = three;
    elseif(i == 4)
        images = four;
    elseif(i == 5)
        images = five;
    elseif(i == 6)
        images = six;
    elseif(i == 7)
        images = seven;
    elseif(i == 8)
        images = eight;
    elseif(i == 9)
        images = nine;        
    end 
    
    numImgToProcess = size(images,3);
    a = positionCP(images, numImgToProcess, cpNum);
    
    results(:,:,i+1) = a;
    
    subplot(2,5,i+1); imagesc(a);
end
hold off

